Hi everyone,
I am using the command “psmatch2” to do 1:1 nearest PSM with replacement.
Here are the codes:
webuse nlswork
gen age2=age^2
gen ttl_exp2=ttl_exp^2
gen tenure2=tenure^2
global xlist "grade age age2 ttl_exp ttl_exp2 tenure tenure2 not_smsa south race"
set seed 0001
gen randomorder=runiform()
sort randomorder
gen treated =(idcode>2000) & !missing(idcode)
psmatch2 treated $xlist, out(ln_wage) logit ate neighbor(1) common caliper (0.05) ties
sort _id
browse idcode year _treated _support _weight _id _n1 _nn _pdif
When I browsed the dataset, I was confused about the following question:
_weight!=. .
For example,
Please see the _n1 for _id==15080|15081|15082|15083
The _n1 for these observations is 7539. As I used replacement PSM, I think 7539 (control) can match four times, and the _weight should not missing for the _id==15081|15082|15083.

I am looking forward to your help. Many thanks!
Ann
I am using the command “psmatch2” to do 1:1 nearest PSM with replacement.
Here are the codes:
webuse nlswork
gen age2=age^2
gen ttl_exp2=ttl_exp^2
gen tenure2=tenure^2
global xlist "grade age age2 ttl_exp ttl_exp2 tenure tenure2 not_smsa south race"
set seed 0001
gen randomorder=runiform()
sort randomorder
gen treated =(idcode>2000) & !missing(idcode)
psmatch2 treated $xlist, out(ln_wage) logit ate neighbor(1) common caliper (0.05) ties
sort _id
browse idcode year _treated _support _weight _id _n1 _nn _pdif
When I browsed the dataset, I was confused about the following question:
- Why _weight==. for some supported treatment observations ( i.e., _treated==1 & _support==1 & _n1!=. ) ?
_weight!=. .
For example,
Please see the _n1 for _id==15080|15081|15082|15083
The _n1 for these observations is 7539. As I used replacement PSM, I think 7539 (control) can match four times, and the _weight should not missing for the _id==15081|15082|15083.
I am looking forward to your help. Many thanks!
Ann